package com.changjiang.tool.config;

public interface PropertiesText {
    String replaceModule = "{replaceModule}";
    String replacePort = "{replacePort}";

    String commonServiceText = "spring.application.name=" + replaceModule + "-service\n" +
            "#datasource\n" +
            "spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver\n" +
            "spring.datasource.type=com.alibaba.druid.pool.DruidDataSource\n" +
            "#初始连接数\n" +
            "spring.datasource.druid.initial-size=10\n" +
            "#最小空闲连接数\n" +
            "spring.datasource.druid.min-idle=10\n" +
            "#最大连接数\n" +
            "spring.datasource.druid.max-active=100\n" +
            "#连接超时时间\n" +
            "spring.datasource.druid.max-wait=30000\n" +
            "#检测时间间隔\n" +
            "spring.datasource.druid.time-between-eviction-runs-millis=60000\n" +
            "#连接最小生存时间\n" +
            "spring.datasource.druid.min-evictable-idle-time-millis=300000\n" +
            "#用来检测连接是否有效的sql，要求是一个查询语句。\n" +
            "spring.datasource.druid.validation-query=: select 'x'\n" +
            "#检测连接是否有效\n" +
            "spring.datasource.druid.test-while-idle=true\n" +
            "#申请连接时执行validationQuery检测连接是否有效\n" +
            "spring.datasource.druid.test-on-borrow=true\n" +
            "#归还连接时执行validationQuery检测连接是否有效\n" +
            "spring.datasource.druid.test-on-return=false\n" +
            "#是否缓存preparedStatement mysql下关闭\n" +
            "spring.datasource.druid.pool-prepared-statements=false\n" +
            "spring.datasource.druid.max-pool-prepared-statement-per-connection-size=-1\n" +
            "#通过别名的方式配置扩展插件，常用的插件有：监控统计用的filter:stat，日志用的filter:log4j，防御sql注入的filter:wall\n" +
            "filters:stat,wall,log4j\n" +
            "#jpa\n" +
            "spring.jpa.generate-ddl=true\n" +
            "spring.jpa.show-sql=true\n" +
            "spring.jpa.hibernate.ddl-auto=update\n" +
            "spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect\n" +
            "#dubbo\n" +
            "dubbo.scan.base-packages=com.jf.mzzc." + replaceModule + ".*\n" +
            "dubbo.application.name=" + replaceModule + "-service\n" +
            "dubbo.protocol.name=dubbo\n" +
            "dubbo.provider.version=1.0\n" +
            "dubbo.provider.group=" + replaceModule + "\n" +
            "dubbo.registry.group=jf\n" +
            "dubbo.provider.timeout=10000\n" +
            "dubbo.protocol.port=" + replacePort + "\n";


    String localServiceModule = commonServiceText + "spring.datasource.url=jdbc:mysql://localhost:3306/jpa_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8\n" +
            "spring.datasource.username=root\n" +
            "spring.datasource.password=newpassword\n" +
            "dubbo.registry.address=zookeeper://127.0.0.1:2181\n" +
            "dubbo.metadata-report.address=zookeeper://127.0.0.1:2181";

    String txServiceModule = commonServiceText + "spring.datasource.url=jdbc:mysql://172.27.0.2:3306/mzzc_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8\n" +
            "spring.datasource.username=root\n" +
            "spring.datasource.password=newpassword_123MYSQL\n" +
            "dubbo.registry.address=zookeeper://172.27.0.2:2181?backup=172.27.0.2:2182,172.27.0.2:2183\n" +
            "dubbo.metadata-report.address=zookeeper://172.27.0.2:2181?backup=172.27.0.2:2182,172.27.0.2:2183\n";

    String jfServiceModule =
            commonServiceText +
                    "dubbo.registry.address=zookeeper://192.168.1.95:2181\n" +
                    "dubbo.metadata-report.address=zookeeper://192.168.1.95:2181\n" +
                    "spring.datasource.url=jdbc:mysql://39.108.85.37:9001/mzzc_test?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8\n" +
                    "spring.datasource.username=root\n" +
                    "spring.datasource.password=DB_2ky2O!9";

    String commonWebText = "";

    String localWebModule = "";

    String txWebModule = "";

    String jfWebModule = "";
}
